package com.toocms.jinjuhang.ui.mine.management_system.sales_income

import com.toocms.jinjuhang.R
import com.toocms.jinjuhang.BR
import com.toocms.jinjuhang.databinding.FgtSalesIncomeBinding
import com.toocms.jinjuhang.ui.base.BaseFgt
import com.toocms.tab.TooCMSApplication

class SalesIncomeFgt : BaseFgt<FgtSalesIncomeBinding, SalesIncomeModel>() {
    override fun onFragmentCreated() {
        topBar.setTitle(R.string.str_sales_income)
    }

    override fun getLayoutResId() = R.layout.fgt_sales_income

    override fun getVariableId() = BR.salesIncomeModel

    override fun viewObserver() {
        viewModel.stopRefreshOrLoadSingleLiveEvent.observe(this) {
            binding.refreshSrl.finishRefresh()
            binding.refreshSrl.finishLoadMore()
        }
    }

    override fun getViewModel() = SalesIncomeModel(TooCMSApplication.getInstance(), arguments)
}